Page({
  data: {
    index: 0,
    multiArray: [['月租','年租'], ['1个月', '2个月', '3个月']],
    objectMultiArray: [
      [
        {
          id: 0,
          name: '年租'
        },
        {
          id: 1,
          name: '月租'
        }
      ], [
        {
          id: 0,
          name: '1年'
        },
        {
          id: 1,
          name: '2年'
        },
        {
          id: 2,
          name: '3年'
        },
        {
          id: 3,
          name: '4年'
        },{
          id: 4,
          name: '5年'
        },{
          id: 5,
          name: '6年'
        },
      ]
    ],
    multiIndex: [0, 0],
    
    customItem: '全部',

  },



  onClose() {
    this.setData({ show: false });
  },

  onSelect(event) {
    console.log(event.detail);
  },

  jump:function(e){
    wx.navigateTo({
      url: '/pages/transaction/transaction',
    })
    console.log(e)
  },
  bindPickerChange: function(e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      index: e.detail.value
    })
  },
  bindMultiPickerChange: function (e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      multiIndex: e.detail.value
    })
  },
  bindMultiPickerColumnChange: function (e) {
    console.log('修改的列为', e.detail.column, '，值为', e.detail.value);
    var data = {
      multiArray: this.data.multiArray,
      multiIndex: this.data.multiIndex
    };
    data.multiIndex[e.detail.column] = e.detail.value;
    switch (e.detail.column) {
      case 0:
        switch (data.multiIndex[0]) {
          case 0:
            data.multiArray[1] = ['1个月', '2个月', '3个月'];
            break;
          case 1:
            data.multiArray[1] = ['半年','1年', '2年', '3年', '4年', '5年'];
            break;
        }
        data.multiIndex[1] = 0;
        data.multiIndex[2] = 0;
        break;
      
        
        data.multiIndex[2] = 0;
        break;
    }
    console.log(data.multiIndex);
    this.setData(data);
  }
})